<?php 
    $img_err=Common::getImageError();
    $device = Common::cUrlHeader(Yii::app()->params["base_url"] . "wurfl");
    $device = json_decode($device,true);
    $width = isset($device['width']) ? $device['width']:650;
    if($width >=650){
        $class="w-650";
    }elseif($width >= 540 && $width <=649 ){
        $class="w-540";
    }elseif($width >= 480 && $width <=539 ){
        $class="w-480";
    }elseif($width >= 360 && $width <=479 ){
        $class="w-360";
    }elseif($width >= 320 && $width <=359 ){
        $class="w-320";
    }else{
        $class="w-240";
    }
?>
<div class="container">
    <div class="main clearfix">
        <div class="box-style bottom10">
            <div class="menu">
                <div class="menu_1"><a href="<?php echo Url::createUrl("clip/index"); ?>">Hot</a></div>
                <div class="menu_1"><a href="<?php echo Url::createUrl("clip/new"); ?>">New</a></div>
                <div class="menu_1"><a href="<?php echo Url::createUrl("clip/top"); ?>">Top</a></div>
                <div class="both"></div>
            </div>

            <div class="list_item clip18">
                <div class="<?php echo $class; ?>">
                    <ul class="list_style clearfix">
                        <?php foreach($data as $key=>$value){ ?>
                            <li>
                                <img width="25" height="25" src="<?php echo Yii::app()->params['static_url']; ?>images/hot.png" class="absolute">
                                <a title="<?php echo $value['title']; ?>" href="<?php echo Url::createUrl("clip/detail",array("id"=>$value['id'],"alias"=>$value['alias'])); ?>">
                                    <img onError="this.src='<?php echo $img_err; ?>'" src="<?php echo Common::getImageKkt($value['picture'],"video",$value['create_date'],''); ?>" alt="<?php echo $value['title']; ?>">
                                </a>
                                <h3 class="tit-clip"><a title="<?php echo $value['title']; ?>" href="<?php echo Url::createUrl("clip/detail",array("id"=>$value['id'],"alias"=>$value['alias'])); ?>"><strong><?php echo $value['title']; ?></strong></a></h3>
                                <p class="clearfix"><span class="views">View: <?php echo $value['hit']; ?></span> - <span class="time">Times: <?php echo $value['duration']; ?></span></p>
                            </li>
                            <?php } ?> 
                    </ul>
                </div>
            </div>
            <div class="button">
                 <?php echo $paging; ?>
            </div>
            <h1 style="display: none !important;">Video 18+, sexy, quay lén, tự sướng, show hàng, kho video hot</h1>
        </div>
        <div class="chuyemuc">
            Chuyên Mục
        </div>
        <div class="chuyenmuc_1">
            <ul>
                <?php foreach($category as $key=>$value){?>
                <li>
                    <a href="<?php echo Url::createUrl("clip/category",array("catId"=>$value['id'],"alias"=>$value['alias'])); ?>"><img width="4" height="7" class="kc_chuyenmuc" src="<?php  echo Yii::app()->params['static_url']; ?>images/tenweb-icon.png"><?php echo $value['name'] ; ?></a>
                </li>
               <?php } ?> 
            </ul>
        </div>
        <div class="bottomone">
            <a href="#">Kho game mobile: tổng hợp game mobile hot 2013</a>
        </div>
    </div>
</div>